<?=n_mod('nrule')->topNav('设置中心','资源关联')?>
<div class="a-form content">
	<form method="post" action="<?=n_url('nsite','nruleSiteSave')?>">
		<div class="n-row">
			<label class="n-col-4">站点:</label>
			<div class="n-col-5">
				<select name="scode">
					<?php
					foreach ($data['list'] as $k => $v) {
					?>
					<option value="<?=$v['scode']?>" <?=$data['scode']==$v['scode']?'selected':''?>><?=$v['name']?></option>
					<?php
					}
					?>
				</select>
			</div>
			<div class="n-col-3"></div>
		</div>
		<div class="n-row"><div class="n-col-12">&nbsp;</div></div>
		
		<div class="n-row">
			<label class="n-col-4">资源类型:</label>
			<div class="n-col-5"><?=$data['lib_type'][$data['pevent']]?></div>
			<div class="n-col-3"></div>
		</div>
		<div class="n-row"><div class="n-col-12">&nbsp;</div></div>

		<div class="n-row">
			<label class="n-col-4">资源信息:</label>
			<div class="n-col-7">
				<?php
				$libArr = explode(',', $data['ids']);
				foreach ($libArr as $k => $v) {
					echo $libname = empty($data['lib_info'][$v]['libname'])?'':$data['lib_info'][$v]['libname']."(资源名)<br />";
					echo $desc = empty($data['lib_info'][$v]['desc'])?'':$data['lib_info'][$v]['desc']."(描述)<br />";
					echo $utime = empty($data['lib_info'][$v]['utime'])?'':date('Y-m-d H:i:s',$data['lib_info'][$v]['utime'])."(更新时间)<br />";
					echo $ctime = empty($data['lib_info'][$v]['ctime'])?:date('Y-m-d H:i:s',$data['lib_info'][$v]['ctime'])."(添加时间)<br />";
				}
				?>
			</div>
			<div class="n-col-1"></div>
		</div>
		<div class="n-row"><div class="n-col-12">&nbsp;</div></div>

		<div class="n-row">
			<label class="n-col-4"></label>
			<div class="n-col-5">
				<input type="hidden" name="pevent" value="<?=$data['pevent']?>" />
				<input type="hidden" name="ids" value="<?=$data['ids']?>" />
				<input type="submit" />
			</div>
			<div class="n-col-3"></div>
		</div>


	</form>
</div>	
